package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;
import java.util.List;


/**
 * The persistent class for the float_salary_sob database table.
 * 
 */
@Entity
@Table(name="float_salary_sob")
@NamedQuery(name="FloatSalarySob.findAll", query="SELECT f FROM FloatSalarySob f")
public class FloatSalarySob implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="float_salary_sob_id")
	private int floatSalarySobId;

	@Temporal(TemporalType.DATE)
	@Column(name="begin_date")
	@JSONField(format="yyyy-MM-dd")
	private Date beginDate;

	@Temporal(TemporalType.DATE)
	@Column(name="build_date")
	@JSONField(format="yyyy-MM-dd")
	private Date buildDate;

	private String builder;

	@Temporal(TemporalType.DATE)
	@Column(name="end_date")
	@JSONField(format="yyyy-MM-dd")
	private Date endDate;

	@Column(name="float_salary_sob_name")
	private String floatSalarySobName;

	private String remark;

	//bi-directional many-to-one association to FloatSalary
	@OneToMany(mappedBy="floatSalarySob")
	@JSONField(serialize = false)
	private List<FloatSalary> floatSalaries;

	//bi-directional many-to-one association to FloatSalaryPerformance
	@OneToMany(mappedBy="floatSalarySob")
	@JSONField(serialize = false)
	private List<FloatSalaryPerformance> floatSalaryPerformances;

	//bi-directional many-to-one association to FloatSalaryTimeSalary
	@OneToMany(mappedBy="floatSalarySob")
	@JSONField(serialize = false)
	private List<FloatSalaryTimeSalary> floatSalaryTimeSalaries;

	public FloatSalarySob() {
	}

	public FloatSalarySob(int floatSalarySobId, Date beginDate, Date buildDate, String builder, Date endDate,
			String floatSalarySobName, String remark) {
		super();
		this.floatSalarySobId = floatSalarySobId;
		this.beginDate = beginDate;
		this.buildDate = buildDate;
		this.builder = builder;
		this.endDate = endDate;
		this.floatSalarySobName = floatSalarySobName;
		this.remark = remark;
	}

	@Override
	public String toString() {
		return "FloatSalarySob [floatSalarySobId=" + floatSalarySobId + ", beginDate=" + beginDate + ", buildDate="
				+ buildDate + ", builder=" + builder + ", endDate=" + endDate + ", floatSalarySobName="
				+ floatSalarySobName + ", remark=" + remark + ", floatSalaries=" + floatSalaries
				+ ", floatSalaryPerformances=" + floatSalaryPerformances + ", floatSalarySubsidies="
				+ ", floatSalaryTimeSalaries=" + floatSalaryTimeSalaries + "]";
	}

	public int getFloatSalarySobId() {
		return this.floatSalarySobId;
	}

	public void setFloatSalarySobId(int floatSalarySobId) {
		this.floatSalarySobId = floatSalarySobId;
	}

	public Date getBeginDate() {
		return this.beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getBuildDate() {
		return this.buildDate;
	}

	public void setBuildDate(Date buildDate) {
		this.buildDate = buildDate;
	}

	public String getBuilder() {
		return this.builder;
	}

	public void setBuilder(String builder) {
		this.builder = builder;
	}

	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getFloatSalarySobName() {
		return this.floatSalarySobName;
	}

	public void setFloatSalarySobName(String floatSalarySobName) {
		this.floatSalarySobName = floatSalarySobName;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public List<FloatSalary> getFloatSalaries() {
		return this.floatSalaries;
	}

	public void setFloatSalaries(List<FloatSalary> floatSalaries) {
		this.floatSalaries = floatSalaries;
	}

	public FloatSalary addFloatSalary(FloatSalary floatSalary) {
		getFloatSalaries().add(floatSalary);
		floatSalary.setFloatSalarySob(this);

		return floatSalary;
	}

	public FloatSalary removeFloatSalary(FloatSalary floatSalary) {
		getFloatSalaries().remove(floatSalary);
		floatSalary.setFloatSalarySob(null);

		return floatSalary;
	}

	public List<FloatSalaryPerformance> getFloatSalaryPerformances() {
		return this.floatSalaryPerformances;
	}

	public void setFloatSalaryPerformances(List<FloatSalaryPerformance> floatSalaryPerformances) {
		this.floatSalaryPerformances = floatSalaryPerformances;
	}

	public FloatSalaryPerformance addFloatSalaryPerformance(FloatSalaryPerformance floatSalaryPerformance) {
		getFloatSalaryPerformances().add(floatSalaryPerformance);
		floatSalaryPerformance.setFloatSalarySob(this);

		return floatSalaryPerformance;
	}

	public FloatSalaryPerformance removeFloatSalaryPerformance(FloatSalaryPerformance floatSalaryPerformance) {
		getFloatSalaryPerformances().remove(floatSalaryPerformance);
		floatSalaryPerformance.setFloatSalarySob(null);

		return floatSalaryPerformance;
	}

	public List<FloatSalaryTimeSalary> getFloatSalaryTimeSalaries() {
		return this.floatSalaryTimeSalaries;
	}

	public void setFloatSalaryTimeSalaries(List<FloatSalaryTimeSalary> floatSalaryTimeSalaries) {
		this.floatSalaryTimeSalaries = floatSalaryTimeSalaries;
	}

	public FloatSalaryTimeSalary addFloatSalaryTimeSalary(FloatSalaryTimeSalary floatSalaryTimeSalary) {
		getFloatSalaryTimeSalaries().add(floatSalaryTimeSalary);
		floatSalaryTimeSalary.setFloatSalarySob(this);

		return floatSalaryTimeSalary;
	}

	public FloatSalaryTimeSalary removeFloatSalaryTimeSalary(FloatSalaryTimeSalary floatSalaryTimeSalary) {
		getFloatSalaryTimeSalaries().remove(floatSalaryTimeSalary);
		floatSalaryTimeSalary.setFloatSalarySob(null);

		return floatSalaryTimeSalary;
	}

}